// 对外暴露路由配置(常量路由)
export const constantRoute = [
  // 登录
  {
    name: 'Adminlogin',
    path: '/admin/login',
    component: () => import('@/views/mis/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true,
      icon: 'Loading',
    },
  },
  {
    name: 'Frontlogin',
    path: '/login',
    component: () => import('@/views/front/Login.vue'),
    meta: {
      title: '登录',
      hidden: true,
      icon: 'Loading',
    },
  },
  // layout
  {
    name: 'home',
    path: '/',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '后台首页',
      hidden: true,
      icon: 'HomeFilled',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/mis/home/index.vue'),
        meta: {
          title: '首页', //用于展示菜单标题
          hidden: false, //用于控制路由在菜单中的显示与隐藏 true表示隐藏
          icon: 'HomeFilled', //用于设置菜单标题前面的图标
        },
      },
      {
        path: '/total',
        name: 'total',
        component: () => import('@/views/mis/total/index.vue'),
        meta: {
          title: '数据统计', //用于展示菜单标题
          hidden: false,
          icon: 'TrendCharts', //用于设置菜单标题前面的图标
        },
      },
      {
        path: '/manage',
        name: 'manage',
        component: () => import('@/views/mis/manage/index.vue'),
        meta: {
          title: '运营配置', //用于展示菜单标题
          hidden: false,
          icon: 'Setting', //用于设置菜单标题前面的图标
        },
      },
    ],
  },
  {
    name: 'Acl',
    path: '/acl',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '权限管理',
      icon: 'Lock',
      hidden: false,
    },
    redirect: '/acl/user',
    children: [
      {
        name: 'AclUser',
        path: '/acl/user',
        component: () => import('@/views/mis/acl/user/index.vue'),
        meta: {
          title: '用户管理',
          icon: 'UserFilled',
          hidden: false,
        },
      },
      {
        name: 'Role',
        path: '/acl/role',
        component: () => import('@/views/mis/acl/role/index.vue'),
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'Connection',
        },
      },
      {
        name: 'Menu',
        path: '/acl/menu',
        component: () => import('@/views/mis/acl/menu/index.vue'),
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Grid',
        },
      },
      {
        name: 'White',
        path: '/acl/white',
        component: () => import('@/views/mis/acl/white/index.vue'),
        meta: {
          title: '用户白名单',
          icon: 'User',
          hidden: false,
        },
      },
    ],
  },

  {
    name: 'Article',
    path: '/article',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '文章管理',
      icon: 'Notebook',
      hidden: false,
    },
    redirect: '/article/list',
    children: [
      {
        name: 'ArticleList',
        path: '/article/list',
        component: () => import('@/views/mis/article/list/index.vue'),
        meta: {
          title: '文章列表',
          icon: 'CopyDocument',
          hidden: false,
        },
      },
      {
        name: 'ArticleEdit',
        path: '/article/edit',
        component: () => import('@/views/mis/article/edit/index.vue'),
        meta: {
          title: '文章编辑',
          icon: 'Edit',
          hidden: false,
        },
      },
      {
        path: '/category',
        component: () => import('@/views/mis/category/index.vue'),
        meta: {
          title: '分类管理', //用于展示菜单标题
          hidden: false,
          icon: 'Operation', //用于设置菜单标题前面的图标
        },
      },
      {
        path: '/tag',
        component: () => import('../views/mis/tag/index.vue'),
        meta: {
          title: '标签管理', //用于展示菜单标题
          hidden: false, //用于控制路由在菜单中的显示与隐藏 true表示隐藏
          icon: 'PriceTag', //用于设置菜单标题前面的图标
        },
      },
    ],
  },

  {
    name: 'Column',
    path: '/column',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '专栏管理',
      icon: 'List',
      hidden: false,
    },
    redirect: '/column/manage',
    children: [
      {
        name: 'ColumnManage',
        path: '/column/manage',
        component: () => import('@/views/mis//column/manage/index.vue'),
        meta: {
          title: '专栏配置',
          icon: 'Management',
          hidden: false,
        },
      },
      {
        name: 'ColumnArticle',
        path: '/column/articleAdd',
        component: () => import('@/views/mis//column/articleAdd/index.vue'),
        meta: {
          title: '专栏文章配置',
          icon: 'DocumentCopy',
          hidden: false,
        },
      },
    ],
  },

  {
    path: '/front',
    name: 'Front',
    component: () => import('@/views/front/Front.vue'),
    meta: {
      title: 'front',
      hidden: true,
      icon: 'CloseBold',
    },
    redirect: '/front/home',
    children: [
      {
        name: 'FrontHome',
        path: '/front/home',
        component: () => import('@/views/front/Home.vue'),
        meta: {
          title: '前台首页',
          icon: 'Home',
          hidden: true,
        },
      },
      {
        name: 'FrontPerson',
        path: '/front/person',
        component: () => import('@/views/front/Person.vue'),
        meta: {
          title: '用户中心',
          icon: 'Person',
          hidden: true,
        },
      },
      {
        name: 'ArticleDetails',
        path: '/front/articleDetails',
        component: () => import('@/views/front/ArticleDetails.vue'),
        meta: {
          title: '文章详情',
          icon: 'Details',
          hidden: true,
        },
      },
      {
        name: 'ArticleSearch',
        path: '/front/articleSearch',
        component: () => import('@/views/front/ArticleSearch.vue'),
        meta: {
          title: '文章搜索',
          hidden: true,
        },
      },
      {
        name: 'ActivityIndex',
        path: '/front/activityIndex',
        component: () => import('@/views/front/Active.vue'),
        meta: {
          title: '活动首页',
          hidden: true,
        },
      },
      {
        name: 'ActivityDetail',
        path: '/front/activityDetail',
        component: () => import('@/views/front/ActiveDetails.vue'),
        meta: {
          title: '活动详情',
          hidden: true,
        },
      },
    ],
  },
  // 404
  {
    name: '404',
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      hidden: true,
      icon: 'CloseBold',
    },
  },
]

// 任意路由
export const anyRoute = {
  name: 'any',
  path: '/:pathMatch(.*)*',
  redirect: '/404',
  meta: {
    title: '任意路由',
    hidden: true,
    icon: 'Compass',
  },
}
